package com.tuanzi.loan.web.lazy.channel;

import com.tuanzi.loan.business.service.common.CommProductIdService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.channel.CommProductIdRequest;
import com.tuanzi.loan.vo.response.channel.CommProductIdResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin 2018/10/18
 */
public class CommProductIdLazyDataModel extends LazyDataSessionModel<CommProductIdRequest, CommProductIdResponse> {

	private CommProductIdService commProductIdService;

	public CommProductIdLazyDataModel(CommProductIdRequest searchRequest, CurrentUserBean session, CommProductIdService commProductIdService) {
		super(searchRequest, session);
		this.commProductIdService = commProductIdService;
	}

	@Override
	protected Page<CommProductIdResponse> doLoad0(PageSearcher<CommProductIdRequest> pageSearcher) {
		return commProductIdService.list(pageSearcher);
	}
}
